<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib uri="TowkerTagLib" prefix="rbac"%>
<%@include file="/commons/include/html_doctype.html"%>
<html>
<head>
	<title>明细</title>
	<%@include file="/commons/include/getById.jsp" %>
	<script type="text/javascript">
$(function(){
	$(".form_title").css("width", "13%");
});
	</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" class="listLogo">
	<tr>
		<td class="title">采购计划申请明细</td>
		<td>
			<div class="menuTool">
				<a class="back" onclick="javascript:window.history.back();return false;" href="#">返回</a>
			</div>
		</td>
	</tr>
</table>
<div class="line"></div>
<table border="0" cellspacing="1" cellpadding="0" class="listTable">
	<tr>
		<td class="form_title">申请单号：</td>
		<td class="form_input">${fn:escapeXml(po.plan_sn)}</td>
	
		<td class="form_title">申请部门代码：</td>
		<td class="form_input">${fn:escapeXml(po.dep_code)}</td>
		
		<td class="form_title">申请性质：</td>
		<td class="form_input">
		<c:if test="${po.plan_attr==1}">生产</c:if>
		<c:if test="${po.plan_attr==2}">库存</c:if>
		<c:if test="${po.plan_attr==3}">固定</c:if>
		<c:if test="${po.plan_attr==4}">临时</c:if>
		</td>
	</tr>
	<tr>
	    <td class="form_title">制单日期：</td>
		<td class="form_input">${fn:escapeXml(po.create_date)}</td>
	   
		<td class="form_title">制单时间：</td>
		<td class="form_input">${fn:escapeXml(po.create_time)}</td>
	
		<td class="form_title">申请用户代码：</td>
		<td class="form_input">${fn:escapeXml(po.user_code)}</td>
	</tr>
	<tr>
		<td class="form_title">递交下一级审核日期：</td>
		<td class="form_input">${fn:escapeXml(po.audit_date)}</td>
	
		<td class="form_title">递交下一级审核时间：</td>
		<td class="form_input">${fn:escapeXml(po.audit_time)}</td>
		
		<td class="form_title">审核人员代码：</td>
		<td class="form_input">${fn:escapeXml(po.audit_user)}</td>
	</tr>
	<tr>
		<td class="form_title">申请单状态：</td>
		<td class="form_input">
		<c:if test="${po.status==0}">申请单未递交到下一级</c:if>
		<c:if test="${po.status==1}">已经递交到下一级审核</c:if>
		<c:if test="${po.status==2}">同意采购计划安排采购</c:if>
		<c:if test="${po.status==3}">已经采购完成</c:if>
		</td>
		
		<td class="form_title">安排采购日期：</td>
		<td class="form_input">${fn:escapeXml(po.purchase_date)}</td>
	
	    <td class="form_title">采购完成日期：</td>
		<td class="form_input">${fn:escapeXml(po.completed_date)}</td>
	</tr>
	<tr>
		<td class="form_title">审核内容：</td>
		<td class="form_input" colspan="5">${fn:escapeXml(po.audit_remark)}</td>
	</tr>
	<tr>
		<td class="form_title">备注：</td>
		<td class="form_input" colspan="5">${fn:escapeXml(po.remark)}</td>
	</tr>
	<tr>
	  <td class="form_title">采购产品</td>
	  <td class="form_input" colspan="5">
	  <table width="340" border="0"
						cellpadding="2" cellspacing="1" class="listLogo" id="MGoodsPanel">
						<tr>
							<td>产品代码</td>
							<td>产品名称</td>
							<td>采购数量</td>
							<td>产品单价</td>
							<td>产品金额</td>
							<td>重量</td>
							<td>计量单位</td>
						</tr>
						<c:forEach items="${refGoods}" var="rg" varStatus="status">
							<tr>
								<td><script>goods[${rg.goods_id}] = '${rg.goods_sn}';</script>${rg.goods_sn}<input
									type="hidden" name="ref_id" value="${rg.id}" /> <input
									type="hidden" name="wprice_${rg.goods_id}"
									id="wprice_${rg.goods_id}" value="${rg.wprice}" />
								</td>
								<td>${rg.goods_name} <input type="hidden"
									name="goods_name_${rg.goods_id}" id="goods_name_${rg.goods_id}"
									value="${rg.goods_name}" />
								</td>
								<td>
											${rg.amount}
										</td>
								
								<td id="sprice_td_${rg.goods_id}">
											${rg.sprice}
								</td>
								<td id="sumMoney_td_${rg.goods_id}">
											${rg.sumMoney}
										
								</td>
								<td>${rg.weight} 
								</td>
								<td>${rg.unit}
								</td>
							</tr>
						</c:forEach>
					</table>
      </td>
    </tr>
</table>
</body>
</html>
